var Xd = new P(23, 25),
Yd = new P(9, 25),
Zd = new P(9, 0);
V.zx = function(a, b, c, d) {
    var e = $d(b);
    if (e && !(0 > c || 9 < c)) {
        b = k;
        e = new U(e);
        if (Da()) {
            var g = function() {
                return new Ib(J.Z + "markers_hd.png", new P(22, 31), {
                    anchor: new P(11, 31),
                    imageOffset: new P(0, -32 * c),
                    imageSize: new P(85, 477),
                    infoWindowAnchor: new P(11, 0)
                })
            },
            b = g(),
            g = g();
            g.jj(new P( - 28, -32 * c));
            e.Lo = b;
            e.Is = g
        } else b = new Ib(J.Z + "markers.png", Xd, {
            anchor: Yd,
            imageOffset: new P(0, -25 * c),
            infoWindowAnchor: Zd
        });
        e.se(b);
        a.Ha(e);
        d && e.xb(d);
        return e
    }
};
V.wk = function(a, b, c) {
    if (b = $d(b)) {
        var b = new U(b),
        d = k;
        Da() ? (d = new Ib(J.Z + "markers_hd.png", new P(21, 31), {
            anchor: Yd,
            imageOffset: new P( - 29, -320),
            imageSize: new P(85, 477),
            infoWindowAnchor: Zd
        }), b.Lo = d) : d = new Ib(J.Z + "markers.png", Xd, {
            anchor: Yd,
            imageOffset: new P(0, -250),
            infoWindowAnchor: Zd
        });
        b.se(d);
        a.Ha(b);
        c && b.xb(c);
        return b
    }
};
V.yx = function(a, b, c) {
    if (b = $d(b)) {
        var b = new U(b),
        d = k;
        if (Da()) {
            var e = function() {
                return new Ib(J.Z + "markers_hd.png", new P(21, 31), {
                    anchor: Yd,
                    imageOffset: new P(0, -383),
                    imageSize: new P(85, 477),
                    infoWindowAnchor: Zd
                })
            },
            d = e(),
            e = e();
            e.jj(new P( - 29, -352));
            b.Lo = d;
            b.Is = e
        } else d = new Ib(J.Z + "markers.png", Xd, {
            anchor: Yd,
            imageOffset: new P(0, -300),
            infoWindowAnchor: Zd
        });
        b.se(d);
        a.Ha(b);
        c && b.xb(c);
        return b
    }
};
function $d(a) {
    var b = [],
    b = k;
    if (a instanceof K) b = a;
    else {
        if ("string" == typeof a) {
            b = C.trim(a).split(",");
            if (2 > b[w]) return;
            b[0] = fa(C.trim(b[0]));
            b[1] = fa(C.trim(b[1]))
        } else if (b = a.slice(0), 2 > b[w]) return;
        b = new K(b[0], b[1])
    }
    return b
}
V.fy = function(a) {
    var b = a.title,
    c = a.Cx,
    d = a.aB,
    e = a.jy,
    a = a.jA || 0;
    if (!b) return k;
    var g = b;
    1 == a ? g += "-\u516c\u4ea4\u8f66\u7ad9": 3 == a && (g += "-\u5730\u94c1\u7ad9");
    var i = 13;
    e && (i = 10);
    g.replace(/[\u0100-\uffff]/g, "##")[w] > 2 * i + 1 && (g = g.substring(0, i) + "&#8230");
    b = "<p style='width:210px;font:bold 14px/16px " + J.fontFamily + ";margin:0;color:#cc5522;white-space:nowrap;overflow:hidden' title='" + b + "'>" + g;
    e && (b += "<a target='_blank' href='" + e + "' style='margin-left:5px;font-size:12px;color:#3d6dcc;font-weight:normal;text-decoration:none;'>\u8be6\u60c5\u00bb</a>");
    b += "</p>";
    e = [];
    e.push("<div style='font:12px " + J.fontFamily + ";margin-top:10px'>");
    if (c) {
        g = "\u5730\u5740\uff1a";
        if (1 == a || 3 == a) g = "\u8f66\u6b21\uff1a";
        e.push('<table cellspacing="0" style="overflow:hidden;table-layout:fixed;width:100%;font:12px ' + J.fontFamily + '" >');
        e.push('<tr><td style="vertical-align:top;width:38px;white-space:nowrap;word-break:keep-all">' + g + '&nbsp;</td><td style="line-height:16px">');
        e.push(c + "&nbsp;</td></tr>");
        d && e.push('<tr><td style="vertical-align:top;">\u7535\u8bdd\uff1a</td><td>' + d + "</td></tr>");
        e.push("</table>")
    } else d && (e.push('<table cellspacing="0" style="table-layout:fixed;width:100%;font:12px ' + J.fontFamily + '">'), e.push('<tr><td style="vertical-align:top;width:36px;white-space:nowrap;word-break:keep-all">\u7535\u8bdd\uff1a</td><td>' + d + "</td></tr></table>"));
    e.push("</div>");
    return new Jb(e.join(""), {
        title: b,
        height: 0,
        width: 230,
        margin: [10, 10, 20, 10]
    })
};
V.yk = function(a, b, c, d) {
    if (b = $d(b)) return d = new U(b, {
        icon: Da() ? new Ib(J.Z + "dest_mkr.png", new P(29, 34), {
            anchor: new P(14, 32),
            imageSize: new P(94, 41),
            imageOffset: new P( - 29 * d, 0),
            infoWindowAnchor: new P(14, 0)
        }) : new Ib(J.Z + "dest_markers.png", new P(42, 34), {
            anchor: new P(14, 32),
            imageOffset: new P(0, -34 * d),
            infoWindowAnchor: new P(14, 0)
        }),
        baseZIndex: 35E5,
        draggingCursor: "pointer"
    }),
    a.Ha(d),
    c && d.xb(c),
    d
};
V.ih = function(a, b) {
    return V.Xf(a, b, ec)
};
V.Fu = [{
    stroke: 6,
    color: "#0030ff",
    opacity: 0.45,
    style: "solid"
},
{
    stroke: 6,
    color: "#0030ff",
    opacity: 0.45,
    style: "solid"
},
{
    stroke: 4,
    color: "#30a208",
    opacity: 0.55,
    style: "dashed"
},
{
    stroke: 5,
    color: "#0030ff",
    opacity: 0.45,
    style: "solid"
},
{
    stroke: 4,
    color: "#ff0103",
    opacity: 0.65,
    style: "dashed"
},
{
    stroke: 5,
    color: "#ff0103",
    opacity: 0.65,
    style: "solid"
}];
V.Xf = function(a, b, c) {
    var d = V.Fu;
    "undefined" == typeof c && (c = 0);
    if (d[c]) {
        var e = d[c],
        d = new Ob(b, {
            strokeWeight: e.stroke,
            strokeColor: e.color,
            strokeOpacity: e.opacity,
            strokeStyle: e.style,
            clickable: l
        });
        a.Ha(d);
        d.QB = c;
        c == ec && (b = new Ob(b, {
            strokeWeight: e.stroke - 2,
            strokeColor: "#fff",
            strokeOpacity: 0.3,
            clickable: l
        }), d.Wm = b, a.Ha(b));
        return d
    }
};
V.Jk = function(a) {
    var b = a.content,
    c = a.Lk,
    d = a.total,
    e = a.sl,
    g = a.wC,
    a = a.wz,
    i = ["<div style='font:12px " + J.fontFamily + "'>"];
    b && i.push("<div style='margin:0 1em 24px 0'>" + b + "</div>");
    a || i.push(V.Ey(d, c));
    i.push("</div>");
    b = new Jb(i.join(""), {
        title: "",
        height: 0,
        width: 220,
        margin: [10, 10, 20, 10]
    });
    if (a) return b;
    b[B]("open", 
    function() {
        var a = Da() ? "touchend": "click";
        C.Lb("trans_prev") && C.C(C.Lb("trans_prev"), a, 
        function() {
            e && "function" == typeof e && e(c - 1, g)
        });
        C.Lb("trans_next") && C.C(C.Lb("trans_next"), a, 
        function() {
            e && "function" == typeof e && e(c + 1, g)
        })
    });
    return b
};
V.Ey = function(a, b) {
    var c = [];
    c.push('<table width="99%" cols="2" style="background:#eaf2ff;font:12px ' + J.fontFamily + '"><tbody><tr>');
    c.push('<td nowrap="nowrap" width="50%" align="left">');
    0 == b ? c.push('<span unselectable="on" style="color:#9c9d99;-moz-user-select:none" >\u4e0a\u4e00\u6b65</span>') : c.push('<a id="trans_prev" style="color:#7777cc;-moz-user-select:none" href="javascript:void(0)">\u4e0a\u4e00\u6b65</a>');
    c.push("</td>");
    c.push('<td nowrap="nowrap" width="50%" align="right">');
    b == a + 1 ? c.push('<span unselectable="on" style="color:#9c9d99;-moz-user-select:none" >\u4e0b\u4e00\u6b65</span>') : c.push('<a style="color:#7777cc" id="trans_next" href="javascript:void(0)">\u4e0b\u4e00\u6b65</a>');
    c.push("</td></tr></tbody></table>");
    return c.join("")
};
V.yr = function(a, b, c, d) {
    if (b = $d(b)) {
        c = c || 0;
        if (Da()) c = new Ib(J.Z + "dest_mkr.png", new P(20, 20), {
            imageSize: new P(94, 41),
            imageOffset: new P( - 59, -21 * c),
            infoWindowAnchor: new P(10, 0)
        });
        else {
            var e = -55;
            1 == c && (e = -76);
            c = new Ib(J.Z + "trans_icons.png", new P(21, 21), {
                imageOffset: new P(0, e),
                infoWindowAnchor: new P(10, 0)
            })
        }
        c = new U(b, {
            icon: c
        });
        a.Ha(c);
        d && c.xb(d);
        return c
    }
};
V.Pi = function(a) {
    return a && a.ia && a.ia.md ? a.ia.md.childNodes[0] : k
};
V.Bx = function(a, b, c) {
    b = new U(b, {
        icon: new Ib(Ec.lx, new P(11, 11))
    });
    c && b.xb(c);
    a.Ha(b);
    return b
};
V.wr = function(a, b) {
    var c = new U(b, {
        icon: new Ib(J.Z + "drag.png", new P(11, 11)),
        draggingCursor: "pointer"
    });
    a.Ha(c);
    c.Il(10);
    return c
};
V.Zr = function() {
    var a = new Kb("\u62d6\u52a8\u4ee5\u66f4\u6539\u8def\u7ebf", {
        offset: new P(30, -10)
    });
    a.Jb({
        border: "solid 1px gray",
        padding: "2px",
        whiteSpace: "nowrap",
        background: "#fff"
    });
    return a
};
V.My = function(a, b) {
    if (a && b) return p.round(p.sqrt(p.pow(a.x - b.x, 2) + p.pow(a.y - b.y, 2)))
};
W.ub = 1;
W.Nh = 2;
W.Ng = 3;
W.Bj = 4;
W.Cj = 5;
W.Aj = 6;
W.zj = 7;
W.Hp = 8;
W.Gp = 9;
W.bf = function(a, b) {
    return a ? "http://map.baidu.com/?s=" + encodeURIComponent("inf&uid=" + a + "&c=" + b) + "&i=0&sr=1": ""
};
W.Nv = function(a) {
    return ! a ? -1: "string" == typeof a ? 2: a instanceof K ? 1: a instanceof wa ? 0: "number" == typeof a ? 3: -1
};
C[x](W[u], {
    Yd: function(a, b) {
        var c = W.Nv(a.src);
        if ( - 1 != c) {
            var d = this;
            if (3 == c) b && b(a.src);
            else if (2 == c) a.Mn == c && a.Nn == a.src && a.cg ? b && b(a.cg) : (a.Mn = c, a.Nn = a.src, fc.Ca(function(a) {
                a && (a.result && 2 == a.result.type) && (d.Cb.cg = a.content.code, b && b(d.Cb.cg))
            },
            {
                qt: "cur",
                wd: a.src
            }));
            else {
                var e,
                g = 18;
                0 == c ? (e = a.src.Ia(), g = a.src.ha()) : e = a.src;
                c == a.Mn && a.Nn.Rb(e) && a.cg ? b && b(a.cg) : (0 == c && (e = T.Wa(e)), 1 == c && (e = T.Wa(e)), a.Mn = c, a.Nn = new K(e.lng, e.lat), fc.Ca(function(a) {
                    if (a && a.result && a.result.type == 4) {
                        d.Cb.cg = a.content ? a.content.uid: 1;
                        b && b(d.Cb.cg)
                    }
                },
                {
                    qt: "cen",
                    b: e.lng + "," + e.lat + ";" + e.lng + "," + e.lat,
                    l: g
                }))
            }
        }
    },
    Ba: function(a) {
        "number" == typeof a ? this.Pb = a: delete this.Pb
    },
    ka: function(a, b, c) {
        var d;
        switch (a) {
        case W.ub:
            d = this.u.ul;
            break;
        case W.Nh:
            d = this.u.zt;
            break;
        case W.Bj:
            d = this.u.Zo;
            break;
        case W.Ng:
            d = this.u.yt;
            break;
        case W.Cj:
            d = this.u.At;
            break;
        case W.Aj:
            d = this.u.xt;
            break;
        case W.zj:
            d = this.u.wt;
            break;
        case W.Hp:
            d = this.u.vt;
            break;
        case W.Gp:
            d = this.u.ut
        }
        d && d(b, c)
    }
});
var ae = 0,
be = 1,
ce = 2;
R.unique = function(a) {
    for (var b = [], c = {},
    d = 0, e = a[w]; d < e; d++) c[a[d]] || (c[a[d]] = f, b.push(a[d]));
    return b
};
R.oo = function(a, b) {
    if (b) var c = p.min(b[y] / 1100, b[A] / 660),
    a = p.round(a + p.log(c) / p.log(2));
    1 > a && (a = 1);
    18 < a && (a = 18);
    return a
};
R.Ka = function(a, b) {
    if ("string" == typeof a && a) {
        var c = a.split("|"),
        d,
        e,
        g;
        if (1 == c[w]) d = de(a);
        else if (d = de(c[2]), e = de(c[0]), g = de(c[1]), !b) return d;
        c = {
            type: d.Hy
        };
        if (b) switch (c.type) {
        case ce:
            e = new K(d.fc[0][0], d.fc[0][1]);
            e = T.Ra(e);
            c.N = e;
            c.R = [e];
            break;
        case be:
            c.R = [];
            d = d.fc[0];
            for (var i = 0, j = d[w] - 1; i < j; i += 2) {
                var n = new K(d[i], d[i + 1]),
                n = T.Ra(n);
                c.R.push(n)
            }
            e = new K(e.fc[0][0], e.fc[0][1]);
            g = new K(g.fc[0][0], g.fc[0][1]);
            e = T.Ra(e);
            g = T.Ra(g);
            c.Va = new La(e, g)
        }
        return c
    }
};
R.Dt = function(a) {
    var b;
    b ? 0.25 > b ? b = 0: 0.25 < b && 1 > b ? b = 1: 32 < b && (b = 32) : b = 0;
    var c = a.split("|");
    if (1 == c[w]) {
        var d = de(c[0]);
        return {
            type: d.type,
            bound: "",
            R: d.fc.join(",")
        }
    }
    if (1 < c[w]) {
        for (var e = a.split(";.="), a = [], g = [], i = 0, j = e[w], c = 0; c < j; c++) {
            i = e[c];
            1 < j && (0 == c && (i += ";"), 0 < c && c < j - 1 && (i = ".=" + i + ";"), c == j - 1 && (i = ".=" + i));
            var i = i.split("|"),
            d = de(i[0]),
            n = de(i[1]);
            a.push(d.fc.join(","));
            a.push(n.fc.join(","));
            d = de(i[2]);
            i = d.type;
            d = d.fc.join(",");
            d = R.gA(d);
            0 < b && (d = R.hA(d, b));
            g.push(d)
        }
        1 >= j && (g = g.join(";"));
        if (2 == j) {
            b = (g[0] + ";" + g[1]).split(";");
            e = [];
            for (c = 0; c < b[w]; c++) g = new K(b[c].split(",")[0], b[c].split(",")[1]),
            g = T.Ra(g),
            e.push(g);
            g = e
        }
        return {
            type: i,
            bound: a.join(";"),
            R: g
        }
    }
};
R.iA = function(a) {
    a = a.split(",");
    a = new K(a[0], a[1]);
    return T.Ra(a)
};
var ee = ["=", ".", "-", "*"],
fe = 8388608;
function de(a) {
    var b;
    b = a.charAt(0);
    var c = -1;
    b == ee[1] ? c = ce: b == ee[2] ? c = be: b == ee[3] && (c = ae);
    b = c;
    for (var c = a.substr(1), d = 0, e = c[w], g = [], a = [], i = []; d < e;) if (c.charAt(d) == ee[0]) {
        if (13 > e - d) return 0;
        a: {
            for (var i = c.substr(d, 13), j = g, n = 0, q = 0, s = 0, z = 0; 6 > z; z++) {
                s = ge(i.substr(1 + z, 1));
                if (0 > s) {
                    i = -1 - z;
                    break a
                }
                n += s << 6 * z;
                s = ge(i.substr(7 + z, 1));
                if (0 > s) {
                    i = -7 - z;
                    break a
                }
                q += s << 6 * z
            }
            j.push(n);
            j.push(q);
            i = 0
        }
        if (0 > i) return 0;
        d += 13
    } else if (";" == c.charAt(d)) a.push(g.slice(0)),
    g[w] = 0,
    ++d;
    else {
        if (8 > e - d) return 0;
        i = he(c.substr(d, 8), g);
        if (0 > i) return 0;
        d += 8
    }
    c = 0;
    for (d = a[w]; c < d; c++) {
        e = 0;
        for (g = a[c][w]; e < g; e++) a[c][e] /= 100
    }
    return {
        Hy: b,
        fc: a
    }
}
function he(a, b) {
    var c = b[w];
    if (2 > c) return - 1;
    for (var d = 0, e = 0, g = 0, i = 0; 4 > i; i++) {
        g = ge(a.substr(i, 1));
        if (0 > g) return - 1 - i;
        d += g << 6 * i;
        g = ge(a.substr(4 + i, 1));
        if (0 > g) return - 5 - i;
        e += g << 6 * i
    }
    d > fe && (d = fe - d);
    e > fe && (e = fe - e);
    b.push(b[c - 2] + d);
    b.push(b[c - 1] + e);
    return 0
}
function ge(a) {
    var b = a.charCodeAt(0);
    return "A" <= a && "Z" >= a ? b - 65: "a" <= a && "z" >= a ? 26 + b - 97: "0" <= a && "9" >= a ? 52 + b - 48: "+" == a ? 62: "/" == a ? 63: -1
};